package com.qianli.cashmama.trade.client.trade.request;

import com.fqgj.common.api.ParamsObject;
import com.fqgj.exception.common.ApplicationException;
import org.apache.commons.lang.StringUtils;

/**
 *
 * 代偿交易请求
 * Created by young on 2017/12/11.
 */
public class LaunchDcTradeRequest extends ParamsObject {
    /**
     * 产品code
     */
    private String productCode;
    /**
     * 用户code
     */
    private String userCode;
    /**
     * 代偿金额
     */
    private String borrowTotalCapital;
    /**
     * 闪电周转trade号
     */
    private String borrowNo;
    /**
     * 闪电周转数据ID
     */
    private String borrowId;
    /**
     * 支付回调地址
     */
    private String payNotifyUrl;
    /**
     * 订单相关
     */
    private String infoOrder;




    @Override
    public void validate() {
        if (StringUtils.isEmpty(productCode)
                || StringUtils.isEmpty(userCode)
                || StringUtils.isEmpty(borrowTotalCapital)
                ) {
            throw new ApplicationException("Parameter error");
        }
    }

    public String getProductCode() {
        return productCode;
    }

    public LaunchDcTradeRequest setProductCode(String productCode) {
        this.productCode = productCode;
        return this;
    }

    public String getUserCode() {
        return userCode;
    }

    public LaunchDcTradeRequest setUserCode(String userCode) {
        this.userCode = userCode;
        return this;
    }

    public String getBorrowTotalCapital() {
        return borrowTotalCapital;
    }

    public LaunchDcTradeRequest setBorrowTotalCapital(String borrowTotalCapital) {
        this.borrowTotalCapital = borrowTotalCapital;
        return this;
    }


    public String getBorrowNo() {
        return borrowNo;
    }

    public LaunchDcTradeRequest setBorrowNo(String borrowNo) {
        this.borrowNo = borrowNo;
        return this;
    }

    public String getPayNotifyUrl() {
        return payNotifyUrl;
    }

    public LaunchDcTradeRequest setPayNotifyUrl(String payNotifyUrl) {
        this.payNotifyUrl = payNotifyUrl;
        return this;
    }

    public String getInfoOrder() {
        return infoOrder;
    }

    public LaunchDcTradeRequest setInfoOrder(String infoOrder) {
        this.infoOrder = infoOrder;
        return this;
    }

    public String getBorrowId() {
        return borrowId;
    }

    public LaunchDcTradeRequest setBorrowId(String borrowId) {
        this.borrowId = borrowId;
        return this;
    }

    @Override
    public String toString() {
        return "productCode："+productCode+",userCode:,"+userCode+"" +
                ",borrowTotalCapital:,"+borrowTotalCapital+"" +
                ",borrowNo:,"+borrowNo+"" +
                ",borrowId:,"+borrowId+"" +
                ",payNotifyUrl:,"+payNotifyUrl+"" +
                ",infoOrder:,"+infoOrder+"";
    }
}
